<div class="container">

{{template Elements/wx_iscroll_slide}}

<style>

#main-menu {padding:0 0;}
#main-menu p{padding:0 0;margin:0 0;}
#main-menu li {list-style:none;margin:0 0;}
#main-menu li a{display:block;margin-top:5px;padding: 20px;color:#333;border:1px solid #ddd;}
#main-menu li a i{font-size:5em;}
/*#main-menu li:nth-child(6n+1) a{ background-color:#dd1184}
#main-menu li:nth-child(6n+2) a{ background-color:#079ae8}
#main-menu li:nth-child(6n+3) a{ background-color:#8fb210}
#main-menu li:nth-child(6n+4) a{ background-color:#caa703}
#main-menu li:nth-child(6n+5) a{ background-color:#5359bb}
#main-menu li:nth-child(6n+6) a{ background-color:#019cba}*/
</style>
<ul class="row" id="main-menu">
{{loop $menus $menu}}
	{{loop $menu['children'] $item}}
		<li class="col-md-4 col-xs-6">
		<?php  if($item['WxMenu']['link']){$link=$item['WxMenu']['link'];}else{ $link = '/wx_menus/view/'.$item['WxMenu']['wx_id'].'/'.$item['WxMenu']['id'];} ?>
		<a class="btn" href="{{$this->Html->url($link)}}">
			{{if $item['WxMenu']['coverimg']}}
				<img src="{{$this->Html->image($item['WxMenu']['coverimg'],array('onlyurl'=>true))}}">
			{{elseif $item['WxMenu']['prefix_icon'] }}
				<i class="{{$item['WxMenu']['prefix_icon']}}"></i>
			{{/if}}
			<p>{{$item['WxMenu']['name']}}</p>
		</a>
		</li>
		
	{{/loop}}
{{/loop}}
</ul>


</div>